#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main()
{
	int i = 0, j = 0, k = 0;
	int a[20] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };

	for (i = 0; i < 20; i++)
	{
		for (j = 2; j < a[i]; j++)
		{
			if (a[i] % j == 0 && j < a[i])

			{
				for (k = i; k < 19; k++) {
					*(a + k) = *(a + k + 1);
				}
			}

		}

	}

	for (i = 1; a[i] < 20; i++)
	{
		printf("%d\t", a[i]);
	}
	return 0;
}
